<!DOCTYPE html>
<html lang="en">
<head>
<title>Workpiece</title>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../../css/bootstrap.min.css">
<link rel="stylesheet" href="../../css/custom.css">
</head>

<body>

<div class="container">
<nav class="navbar">
<a class="btn btn-info btn-xs navbar-btn pull-right m-l" href="../index.html">REST API</a>
<a class="btn btn-info btn-xs navbar-btn pull-right" href="../../index.html">Back to Docs</a>
</nav>

<h1>Workpieces</h1>
<p><code>/v3/nc/workpieces</code></p>
<p>Defined in <a href="https://github.com/steptools/NC.js/blob/master/src/server/api/v3/tolerances.js">tolerances.js</a></p>

<H2>Get All Workpieces</H2>

<PRE>GET /v3/nc/workpieces</PRE>


<p>GET on the workpieces API endpoint returns an object containing all
workpieces held by the digital thread.  The object acts as a map from
the workpiece ID to the <a href="workpiece_object.html">workpiece
object</a>

<PRE>
GET /v3/nc/workpieces
==>
{
  "8052": {
    "id":8052,
    "name":"unnamed workpiece",
    /* see <a href="workpiece_object.html">workpiece object</a> for other properties */
  },
  "10504":{
    "id":10504,
    "name":"asis84155",
    /* other properties omitted */
  }
}
</PRE>   

<script src="../../js/jquery.min.js"></script>
<script src="../../js/bootstrap.min.js"></script>
</body>
</html>
